/**
 * 
 */
package no.ntnu.item.ttm4115.termproject.callhelprole_playeragent.gui;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
/**
 * @author item
 *
 */
public class PopUp extends JFrame{
	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}	
    private JButton accept;
    private JButton reject;
    private JLabel shortMessage;
    private JPanel popupWindow;
    
    public PopUp() {
        init();
        this.pack();
        this.setAlwaysOnTop(true);
        this.setBounds(0, 0, 250, 150);
        this.setTitle("help request");
        this.setLocationRelativeTo(null);
        this.setVisible(true);
    }

    /**
     * Initialiser.
     */
    private void init() {
    	accept = new JButton("accept");
    	reject = new JButton("reject");
    	popupWindow = new JPanel();
    	
    	popupWindow.setToolTipText("help request");
    	accept.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                // accept action
            	
            }
        });

        // add components to main panel
        popupWindow.setLayout(null);
        {
        	shortMessage = new JLabel("description");
        	popupWindow.add(shortMessage);
        	FlowLayout shortMessageLayout = new FlowLayout();
        	shortMessage.setLayout(shortMessageLayout);
        	shortMessage.setText(getMessageContent());
        	shortMessage.setPreferredSize(new java.awt.Dimension(242, 50));
        	shortMessage.setBounds(0, 0, 0, 0);
        }
        popupWindow.add(accept);
        accept.setPreferredSize(new java.awt.Dimension(33, 50));
        accept.setBounds(0, 0, 0, 0);
        popupWindow.add(reject);
        reject.setPreferredSize(new java.awt.Dimension(33, 50));
        reject.setBounds(0, 0, 0, 0);
        this.getContentPane().add(popupWindow);
        // use frame

 


    }

    /**
	 * @return
	 */
	private String getMessageContent() {
		// TODO Auto-generated method stub
		//reserved message lable that displaying the requester's short description of the
		// help content
		return "    i get choked!!!!";
	}

	public static void main(String[] args) {
        PopUp a =new PopUp();
    }
	
}
